package com.yuexun.dhdoctor.module.Chartered.model.impl;

import com.yuexun.dhdoctor.base.BaseEntity;
import com.yuexun.dhdoctor.module.Chartered.api.CharteredApi;
import com.yuexun.dhdoctor.module.Chartered.bean.CharteredBean;
import com.yuexun.dhdoctor.module.Chartered.model.ICharteredModel;
import com.yuexun.dhdoctor.module.contractmanage.api.ContractManageApi;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by Administrator on 2019/1/29 0029.
 */

public class CharteredModel implements ICharteredModel {
    private CharteredApi api;

    public CharteredApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(CharteredApi.class);
        }
    }

    @Override
    public Observable<BaseEntity<CharteredBean>> inquireUserPractic(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireUserPractic(praise);
    }
}
